# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         test06
# Description:
# Author:       98745
# Date:         2019/4/20
#-------------------------------------------------------------------------------
import sqlite3
import os

dbPath = './db/data.sqlite'
if not os.path.exists(dbPath):
    conn = sqlite3.connect(dbPath)
    c = conn.cursor()
    c.execute('''CREATE TABLE persons
        (id INT PRIMARY KEY     NOT NULL,
        name           TEXT    NOT NULL,
        age            INT     NOT NULL,
        address        CHAR(50),
        salary         REAL);''')
    conn.commit()
    conn.close()
    print('创建数据成功')

